core: INCOMPATIBLE CHANGE: Rename .packfile to .archive
authorColin Walters <walters@verbum.org>
Thu, 8 Dec 2011 22:15:59 +0000 (17:15 -0500)
committerColin Walters <walters@verbum.org>
Thu, 8 Dec 2011 22:15:59 +0000 (17:15 -0500)
It's too confusing that we call the mode "archive" but the actual
files ".packfile".  Also, git already has a "packfile" that serves a
totally different purpose.

src/libostree/ostree-core.c
src/libostree/ostree-repo.c
src/ostree/ot-builtin-fsck.c

index 63793cebd6512ae5ae0a709e22e378348cf1984f..42ba64b8027ed256bac496e066fc4dd30642c403 100644 (file)
@@ -541,7 +541,7 @@ ostree_get_relative_object_path (const char *checksum,
     {
     case OSTREE_OBJECT_TYPE_FILE:
       if (archive)
-        type_string = ".packfile";
+        type_string = ".archive";
       else
         type_string = ".file";
       break;
@@ -714,7 +714,7 @@ ostree_parse_packed_file (GFile            *file,
   if (bytes_read != 4)
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                   "Corrupted packfile; too short while reading metadata length");
+                   "Corrupted archive file; too short while reading metadata length");
       goto out;
     }
       
@@ -722,7 +722,7 @@ ostree_parse_packed_file (GFile            *file,
   if (metadata_len > OSTREE_MAX_METADATA_SIZE)
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                   "Corrupted packfile; metadata length %u is larger than maximum %u",
+                   "Corrupted archive file; metadata length %u is larger than maximum %u",
                    metadata_len, OSTREE_MAX_METADATA_SIZE);
       goto out;
     }
@@ -733,7 +733,7 @@ ostree_parse_packed_file (GFile            *file,
   if (bytes_read != metadata_len)
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                   "Corrupted packfile; too short while reading metadata");
+                   "Corrupted archive file; too short while reading metadata");
       goto out;
     }
 
@@ -785,7 +785,7 @@ ostree_parse_packed_file (GFile            *file,
       if (bytes_read != 4)
         {
           g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                       "Corrupted packfile; too short while reading device id");
+                       "Corrupted archive file; too short while reading device id");
           goto out;
         }
       dev = GUINT32_FROM_BE (dev);
@@ -801,7 +801,7 @@ ostree_parse_packed_file (GFile            *file,
   else
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                   "Corrupted packfile; invalid mode %u", mode);
+                   "Corrupted archive file; invalid mode %u", mode);
       goto out;
     }
 
index 745d7a438dc71227380ddcd84e1a6740f1a06958..43e436f80827291a924aa5a84645d22eac83bd5f 100644 (file)
@@ -1919,7 +1919,7 @@ iter_object_dir (OstreeRepo             *self,
       if (g_str_has_suffix (name, ".meta"))
         objtype = OSTREE_OBJECT_TYPE_META;
       else if (g_str_has_suffix (name, ".file")
-               || g_str_has_suffix (name, ".packfile"))
+               || g_str_has_suffix (name, ".archive"))
         objtype = OSTREE_OBJECT_TYPE_FILE;
       else
         goto loop_out;
index 8f65db61c8047ad85580bb364467f61abd106a50..f73f5e932fd6d08c35193c7de67cdee1d1c3098b 100644 (file)
@@ -129,10 +129,10 @@ object_iter_callback (OstreeRepo    *repo,
   if (ostree_repo_get_mode (repo) == OSTREE_REPO_MODE_ARCHIVE
       && objtype == OSTREE_OBJECT_TYPE_FILE)
     {
-      if (!g_str_has_suffix (path, ".packfile"))
+      if (!g_str_has_suffix (path, ".archive"))
         {
           g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                       "Invalid unpacked filename '%s'",
+                       "Invalid archive filename '%s'",
                        path);
           goto out;
         }